<?php
session_start();
require_once 'function.php';
if($_GET['isbn']) $book=M()->select('book','*','ISBN="'.$_GET['isbn'].'"')[0];

 ?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title><?php echo $book['name']  ?></title>
  <link rel="stylesheet" href="public/semantic.min.css" media="screen" title="no title" charset="utf-8">
  <link rel="stylesheet" href="public/index.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
  <div class="ui menu">
  <div class="header item">网上书店</div>
  <a class="active item">首页</a>
  <div class="ui dropdown item" tabindex="0">
    <?php echo $_SESSION['username'] ?>
    <i class="dropdown icon"></i>
    <div class="menu transition hidden" tabindex="-1">
      <div class="item">我的信息</div>
      <div class="item">我的订单</div>
      <div class="item"><a href="admin.html">后台管理</a></div>
    </div>
  </div>
  <div class="right menu">
    <div class="item">
      <div class="ui action left icon input">
        <i class="search icon"></i>
        <input type="text" placeholder="Search">
        <button class="ui button">搜索</button>
      </div>
    </div>
    <div class="ui dropdown item">
      <div class="text">购物车</div>
      <i class="shop icon"></i>
      <div class="menu menu-car">

      </div>
    </div>
  </div>
</div>
  <script src="public/jquery-2.2.0.js" charset="utf-8"></script>
  <script src="public/semantic.min.js" charset="utf-8"></script>
  <script>
  $(document).ready(function() {
    $('.rating').rating('setting', 'clearable', true);
    $('.special.cards .image').dimmer({
      on: 'hover'
    });
    $('.ui.accordion').accordion({
    selector: {
      trigger: '.title '
    }
  })
      $('.ui.menu .ui.dropdown').dropdown({
        on: 'hover'
      });
      $('.ui.menu a.item').on('click', function() {
          $(this)
            .addClass('active')
            .siblings()
            .removeClass('active')
          ;
        });


    })
  ;

  </script>
</body>
</html>
